<template>
    <div class="fz">
        <Ph/>
        <!-- <Ph v-for="(v,i) in title" :key="i" :title="v"/> -->
        <div class="wrap">
            <Pz v-for="(v,i) in arr" 
            :key="i" 
            :cakeimage="v.cakeimage" 
            :cakename="v.cakename" 
            :cakeprice="v.cakeprice" 
            :cakeoriginal="v.cakeoriginal" 
            :goodsid="v.goodsid" 
            :cakeingredients="v.cakeingredients"
            />
        </div>
    </div>
</template>

<script>
import Pz from "@/components//ddgHD/popularzi.vue"
import Ph from "@/components//ddgHD/publichead.vue"
import {getlink} from "@/api/getapi.js"
export default {
    props:["cakeimage","cakename","cakebrief","cakeprice","cakeoriginal","cakeingredients","goodsid","scorenum"],
    components:{
        Pz,
        Ph
    },
    data(){
        return {
            arr:[],
            title:["乳脂","慕斯","水果","品塔","芝士","巧克力","冰淇淋","拿破仑","干果"]
        }
    },
    created(){
        getlink("http://180.76.121.47:8008/cake").then((ok)=>{
            ok.data.data.forEach((el)=>{
                if(el.typeid==1002){
                    this.arr.push(el)
                }
            })
        })
    }
}
</script>

<style scoped>
    .fz{
        width: 100%;
        font-size: 0.12rem;
        text-align: center;
    }
    .wrap{
        width: 100%;
        display: flex;
        justify-content: space-evenly;
        flex-wrap: wrap;
    }
</style>